package cn.wqk.rrtf.service;

import cn.wqk.rrtf.mapper.GradeMapper;
import cn.wqk.rrtf.pojo.Grade;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GradeServiceImpl implements GradeService{
    @Autowired
    GradeMapper gradeMapper;
    @Override
    public int insertGrade(Grade grade) {
        return gradeMapper.insertGrade(grade);
    }

    @Override
    public int deleteGrade(@Param("gradeId") Integer gradeId) {
        return gradeMapper.deleteGradeByManagerId(gradeId);
    }

    @Override
    public int updatGrade(Grade grade) {
        return gradeMapper.updateGradeByManagerId(grade);
    }

    @Override
    public Grade selectGradeByMemberId(Integer memberId) {
        return gradeMapper.selectGradeByMemberId(memberId);
    }
}
